
#ifndef _KEY_PROCESS_H
#define _KEY_PROCESS_H
//#include "stdint.h"
//#include "r_cg_macrodriver.h"
#include "sc95f.h"
#define  KEY_TIMING          	    0x10//,1
#define  KEY_DECREASE        			0x20//,4
#define  KEY_INCREASE       			0x08//,2
#define  KEY_WIND_SPEED          	0x04//,1
#define  KEY_STIR_FRY         		0x02
#define  KEY_SELF_HELP         		0x01

//extern uint8_t button1_count;
//extern uint8_t button2_count;
//extern uint8_t button3_count;
//extern uint8_t button4_count;
//extern uint8_t breath_or_all_show_flg;
//extern uint8_t flow_flg;
//extern uint8_t flow_flg_count;
extern uint8_t KEY_TIMING_SHORT_FLG;
//extern uint8_t KEY_TIMING_SHORT_COUNT;
typedef enum
{
	KEY_NONE = 0,
	
	KEY_TIMING_SHORT ,
	KEY_TIMING_LONG ,
	
	KEY_INCREASE_SHORT ,
	KEY_INCREASE_LONG ,



	KEY_DECREASE_SHORT,
	KEY_DECREASE_LONG,

	KEY_WIND_SPEED_SHORT,
	KEY_WIND_SPEED_LONG,
	
	KEY_STIR_FRY_SHORT,
	KEY_STIR_FRY_LONG,
	
	KEY_SELF_HELP_SHORT,
	KEY_SELF_HELP_LONG,

	KEY_LOCK_SHORT,
	KEY_LOCK_LONG,

	KEY_VERSION_SHORT,
	KEY_VERSION_LONG,

	KEY_VERSION1_SHORT,
	KEY_VERSION1_LONG,
    
	KEY_INVALID_ADDGARM     = 0xFC,  // ADDGARM KEY INVALID 
	KEY_INVALID_DOOR        = 0xFD,  // DOOR KEY INVALID 
	KEY_INVALID_KEY         = 0xFE,  // An Invalid KEY 
	KEY_KNOB                = 0xFF,  // KNOB VALID 

}KEY_NAMES;

 /*---------------------------------------------------------------------------*
 |  KeyInit
 |
 |  Initialize the key module. Called once on power-up.
 |
 |  For details see Key.h
 *---------------------------------------------------------------------------*/
void KeyInit(void);

/*---------------------------------------------------------------------------*
 |  KeyProcess
 |
 |  Description
 |
 |  Entry:  No requirement
 |  Exit:   Returns nothing
 *---------------------------------------------------------------------------*/
void button_process(void);
void KeyProcess(void);

/*---------------------------------------------------------------------------*
 |  KeyNum
 |
 |  For details see Key.h
 *---------------------------------------------------------------------------*/
//uint8_t KeyEvent(void);

//void KeyEventSet(uint8_t event);

//void clearEventListener(void);
uint8_t KeyEvent(void);
uint8_t EventListener( KEY_NAMES  keyEvent);
//void Event_Clean(void);
//void Dispatch_TouchEvent(void);
// extern uint8_t button_stat;
void key_process(void);
void up_and_down_key_process(void);
void fun_key_change_process(void);
//void key(void);
#endif
